Properties

Name Returns Notes Example
queryTables List
list List
sources List
menus List
engine ScriptEngine
onAppEnabled String
onAppDisabled String
websiteMappings List
adminMappings List
adminPortletMappings List
templates List
websitePortletMappings List
profileTabMappings List
triggerTypeMappings List
eventListeners List
profileTimelineMapping ProfileTimelineMapping
mailboxMappings List
menuMappings List
appName String
repoName String
modifiedDate Date
branchFolder BranchFolder
roles List
reports List
nodeTypes List
journeyFields List
journeyFieldsFunction Object
repoAppSettings List
queries List

Methods

Name Returns Notes Example
addTemplate ( parentPath, fileName, description, contentTemplate ) ControllerMappingList
addNodeType ( name, template ) ControllerMappingList
addActionNodeType ( name, template, jsMethod ) ControllerMappingList
addGoalNodeType ( name, template, jsMethod ) ControllerMappingList
addJourneyField ( id, label, type, input, operators, evalFunction ) ControllerMappingList
addNumericJourneyField ( id, label, integer, evalFunction ) ControllerMappingList
addTextJourneyField ( id, label, evalFunction ) ControllerMappingList
addComponent ( compId, type, desc, jsFile, editorHtml, previewImage, renderTemplate, settingsTemplate ) ControllerMappingList
addComponent ( compId, type, desc, categories, jsFile, editorHtml, previewImage, renderTemplate, settingsTemplate ) ControllerMappingList
addComponent ( appId, compId, type, desc ) ControllerMappingList Simple method to add a component with one type and default options
addComponent ( appId, compId, type, desc, categories ) ControllerMappingList Simple method to add a component with one type and default options
addComponent ( appId, compId, types, desc, categories ) ControllerMappingList Simple method to add a component with one type and default options
getAsyncProcess ( taskName ) JsProcessable
getWebsocketMapping ( type ) RepoAppWebsocketMapping
automationTrigger ( ) TriggerTypeBuilder Use this to build an automation trigger
addEventListener ( eventType, enabled, function ) ControllerMappingList Use this to listen for Automation Trigger events.
 controllerMappings.addEventListener('ContactEvent', true, 'handleEvent');

 function handleEvent(page, event){
     log.info('Got event {}', event);
 }
 
setUserTimelineFunction ( func ) ControllerMappingList Sets the method to be called when generating the users timeline
controllerMappings.setUserTimelineFunction('generateTimelineItems');

 function generateTimelineItems(page, user, list){
  var streamItem = applications.stream.streamEventBuilder()
                                      .profile(user)
                                      .title('Example Title')
                                      .desc('Example Description')
                                      .date(formatter.now)
                                      .category('info')
                                      .inbound(true)
                                      .icon('fa-exclamation')
                                      .build();

  list.add(streamItem);

 }
renderPortlet ( p, currentUser, mapOfGroups, rootFolder, context, writer ) void
call ( execFn, args ) Object
addReport ( reportId, title, description, reportTemplate, function, attachmentContentType, attachmentExtension ) void
addReport ( reportId, title, description, reportTemplate, functionPtr, attachmentContentType, attachmentExtension ) void
journeyFieldsFunction ( fn ) ControllerMappingList Set the journey fields function, as either a closure or a function name This is for loading fields dynamically and can be used instead of, or as well as, the journeyFields collection (via the addXXXField methods) which is for statically defined fields Returns this for method chaining The function is called with two arguments - rootFolder and the field list

Ask a question, or offer an answer